

const { createProxyMiddleware } = require("http-proxy-middleware");

// target不能为空字符串
const devTarget = "http://192.168.9.105:8090/"; //李松林 http://192.168.0.179:52010/doc.html

// -------------------------------------------------------------------------------------------------------------
// const betaTarget = "http://lixianshengpc.ydche.com/";
// const prodTarget = "http://lixianshengpc.ydche.com/";

// 修改代理目标
const target = devTarget;

module.exports = (app) => {
  app.use(
    "/bms",
    createProxyMiddleware({
      target,
      changeOrigin: true,
    }),
  );
};
